package com.example.a84416.shiyan2;

import android.app.Activity;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.view.View.OnClickListener;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button btn1=(Button)findViewById(R.id.LinearLayout);
        btn1.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                Intent i=new Intent(MainActivity.this,UC1.class);
                startActivity(i);
            }
        });
        Button btn2=(Button)findViewById(R.id.RelativeLayout);
        btn2.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                Intent i=new Intent(MainActivity.this,UC2.class);
                startActivity(i);
            }
        });
        Button btn3=(Button)findViewById(R.id.FrameLayout);
        btn3.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                Intent i=new Intent(MainActivity.this,UC3.class);
                startActivity(i);
            }
        });
        Button btn4=(Button)findViewById(R.id.TableLayout);
        btn4.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                Intent i=new Intent(MainActivity.this,UC4.class);
                startActivity(i);
            }
        });
        Button btn5=(Button)findViewById(R.id.Grid);
        btn5.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View view) {
                Intent i=new Intent(MainActivity.this,UC5.class);
                startActivity(i);
            }
        });

        }

}

